<?php

$local_custom_fields = array(
////15CRM
////******
    ///MAIL BOX
    'outbox_description' => array(
        'field_type' => 'html',
        'html' => "PROTOTYPE INFOS: Here would be the Mail Outbox=sent.
             <br>This must be visible ONLY to the connected user to see ONLY his own emails, others will NOT be able to see the user emails. We must add a notion of Private here.
           <br>A list more or less like the Inbox but just showing the sent. We must consider adding a NEW TABLE in worpdress for this and store the emails received/sent out of the posts table for perfomances consideration, avoiding to flood this table.
            "
    ), 'mailaccount_description' => array(
        'field_type' => 'html',
        'html' => "PROTOTYPE INFOS: Here would be the EMAIL ACCOUNT settings.
             <br>This must be visible ONLY to the connected user to see ONLY his own emails, others will NOT be able to see the user emails. We must add a notion of Private here.
           <br>Here the user enter all the infos about his email account, server infos, can pick pop or imap, set the port and if ssl or not... PLUS an email signature to be added below each email if selected with checbox
            "
    ),
    'managecat_html' => array(
        'field_type' => 'html',
        'html' => "NOTE PROTOTYPE: Assume here we have a simple UI to manage the categories for the emails of the user. Each use can have his own different categories"
    ),
    'mailaccount_in' => array(
        'field_type' => 'html',
        'html' => "<h4>Receive - IMAP server connection settings</h4>"
    ),
    'mailaccount_out' => array(
        'field_type' => 'html',
        'html' => "<h4>Send - SMTP server connection settings</h4>"
    ),
    'mailaccount_globalset' => array(
        'field_type' => 'html',
        'html' => "<h4>Global</h4>",
        'label_config' => array(
            'size_cls' => "f",
        ),
        'width' => 6,
        'fieldwidth' => 6,
    ),
    ///
    'email_account' => array(
        'label' => __('Email Account Address*'),
        'restrict_format' => 'email',
        'label_config' => array(
            'size_cls' => "f",
        ),
        'width' => 6,
        'fieldwidth' => 6,
    ),
    'textrequired' => array(
        'field_type' => 'html',
        'html' => "<span style='font-size:11px; color:red;'>*= required fields</span>",
        'label_config' => array(
            'size_cls' => "f",
        ),
        'width' => 6,
        'fieldwidth' => 6,
    ),
    'managecatfield' => array(
        'field_type' => 'setCategoryManage',
        'label_config' => array(
            'size_cls' => "f",
        ),
        'width' => 12,
        'fieldwidth' => 12,
    ),
    'from_email' => array(
        'label' => __('From Email Address'),
        'restrict_format' => 'email',
        'label_config' => array(
            'size_cls' => "f",
        ),
        'width' => 6,
        'fieldwidth' => 6,
    ),
    'mailaccount_port' => array(
        'label' => __('Port In*'),
        'default' => '',
        'data_type' => 'select',
        'column_label' => 'Account Type',
        'options' => array('993 (IMAP SSL)', '143 (IMAP)', 'Other port'), // '995 (POP SSL)', '110 (POP)',
        'field_type' => 'select',
        'field_config' => array(
        //'use_none'=>true,
        //'link_parent'=>false,
        ),
        'label_config' => array(
            'size_cls' => "f",
        ),
        'width' => 6,
        'fieldwidth' => 5,
    //'fieldheight' => 3
    ),
    'mailaccount_portother' => array(
        'label' => __('Other Port In'),
        'label_config' => array(
            'size_cls' => "f",
        ),
        'width' => 6,
        'fieldwidth' => 6,
    ),
    'mailaccount_portout' => array(
        'label' => __('Port Out*'),
        'default' => '',
        'data_type' => 'select',
        'column_label' => 'Account Type',
        'options' => array('Standard: 25', 'SSL: 465'),
        'field_type' => 'select',
        'field_config' => array(
        //'use_none'=>true,
        //'link_parent'=>false,
        ),
        'label_config' => array(
            'size_cls' => "f",
        ),
        'width' => 6,
        'fieldwidth' => 5,
    //'fieldheight' => 3
    ),
    'mailaccount_portotherout' => array(
        'label' => __('Other Port Out'),
        'label_config' => array(
            'size_cls' => "f",
        ),
        'width' => 6,
        'fieldwidth' => 6,
    ),
    'mailaccount_checkperiod' => array(
        'label' => __('Check email period (minutes)'),
        'help' => __('Check for new messages every X minutes'),
        'label_config' => array(
            'size_cls' => "f",
        ),
        'default' => 1,
        'width' => 6,
        'fieldwidth' => 4,
    ),
    'mail_compose_selecttpl' => array(
        'field_type' => 'setSelectMailTpl',
        'label_config' => array(
            'size_cls' => "f",
        ),
        'width' => 10,
        'fieldwidth' => 10,
    ),
    'mailaccount_signature' => array(
        'field_type' => 'richtexteditor',
        'label_config' => array(
            'size_cls' => "f",
        ),
        'width' => 12,
        'fieldwidth' => 2,
    ),
    'mailaccount_signaturelabel' => array(
        'field_type' => 'html',
        'html' => "<label class='control-label  lbl_float lbl_f' >Email Signature:</label>"
    ),
    'mail_compose_rte' => array(
        'field_type' => 'richtexteditor',
        'label_config' => array(
            'size_cls' => "f",
        ),
        'width' => 12,
        'fieldwidth' => 2,
    )
    , 'mailboxattachment' => array(
        'label' => __('Add attachement'),
        'field_type' => 'setMailAttachment',
        'hide_label' => true,
        'field_config' => array(
        ),
        'label_config' => array(
            'size_cls' => "f",
        ),
        'width' => 12,
        'fieldwidth' => 10
    ),
    'mailboxemail_subject' => array(
        'label' => __('Email Subject'),
        'label_config' => array(
            'size_cls' => "f",
        ),
        'width' => 12,
        'fieldwidth' => 10,
    )
    , 'mailboxsend_email' => array(
        'label' => __('Send this email'),
        'field_type' => 'action_button',
        'button_label' => __('Send'),
        'button_icon' => 'icon-envelope',
        'button_margin' => ' bot12top8 ',
        'hide_label' => true,
        'field_config' => array(
            'btn_class' => 'btn-success',
            'btn_size' => 'btn-small',
            'clearfix' => true,
        ),
        'label_config' => array(
            'size_cls' => "f",
        ),
        'width' => 2,
        'fieldwidth' => 2
    )
    , 'mailboxcancelsend_email' => array(
        'label' => __('Dont send this email'),
        'field_type' => 'action_button',
        'button_label' => __('Cancel'),
        //'button_icon' => __('icon-envelope'),
        'hide_label' => true,
        'field_config' => array(
            'btn_class' => 'btn-info',
        ),
        'label_config' => array(
            'size_cls' => "f",
        ),
        'width' => 1,
        'fieldwidth' => 2
    )
    , 'mail_compose_rtelabel' => array(
        'field_type' => 'html',
        'html' => "<label class='control-label  lbl_float lbl_f' >Email content:</label>"
    )
    , 'mail_compose_empty' => array(
        'field_type' => 'html',
        'html' => "",
        'label_config' => array(
            'size_cls' => "f",
        ),
        'width' => 10,
        'fieldwidth' => 8
    )
    , 'mail_compose_toaddbtn' => array(
        'field_type' => 'html',
        'html' => "Add Account | Add Lead | Add Contact | Add Mailing list",
        'label_config' => array(
            'size_cls' => "f",
        ),
        'width' => 4,
        'fieldwidth' => 4,
    )
    , 'mail_compose_sendcancel' => array(
        'field_type' => 'html',
        'html' => "SEND | CANCEL",
        'label_config' => array(
            'size_cls' => "f",
        ),
        'width' => 12,
        'fieldwidth' => 2,
    ),
    'mail_compose_to' => array(
        'field_type' => 'setDestinee',
        'label_config' => array(
            'size_cls' => "f",
        ),
        'width' => 12,
        'fieldwidth' => 12,
    ),
    'mail_compose_cc' => array(
        'label' => __('Cc'),
        'field_type' => 'setDestinee',
        'label_config' => array(
            'size_cls' => "f",
        ),
        'width' => 6,
        'fieldwidth' => 5,
    ),
    'mail_inbox' => array(
        'field_type' => 'setMailingBox',
        'field_config' => array(
            'type' => "inbox",
        ),
        'label_config' => array(
            'size_cls' => "f",
        ),
        'width' => 12,
        'fieldwidth' => 10,
    ),
    'mail_outbox' => array(
        'field_type' => 'setMailingBox',
        'field_config' => array(
            'type' => "outbox",
        ),
        'label_config' => array(
            'size_cls' => "f",
        ),
        'width' => 12,
        'fieldwidth' => 10,
    ),
    'mail_compose_usetpl' => array(
        'label' => __('Use Email template?'),
        'field_type' => 'radio',
        'options' => array("Yes ", "No, use free content input"),
        'label_config' => array(
            'size_cls' => "f",
        ),
        'width' => 6,
        'fieldwidth' => 3,
    ),
    'mail_compose_addsignature' => array(
        'label' => __('Add signature'),
        'description' => 'If checked, we will append your Email Signature at the end of this email. You can set your email signature in Email Account Settings.',
        'field_type' => 'checkbox',
        'label_config' => array(
            'size_cls' => "f",
        ),
        'width' => 3,
        'fieldwidth' => 3,
    ),
    'mailaccount_signature_enable' => array(
        'label' => __('Add email signature by default?'),
        'description' => 'If checked, we will append your Email Signature at the end of each email sent.',
        'field_type' => 'checkbox',
        'label_config' => array(
            'size_cls' => "f",
        ),
        'width' => 6,
        'fieldwidth' => 3,
    ),
    'from_name' => array(
        'label' => __('From Name'),
        'label_config' => array(
            'size_cls' => "f",
        ),
        'width' => 6,
        'fieldwidth' => 6,
    ),
    'mailbox_enable' => array(
        'label' => __('Enable Mail Account'),
        'description' => 'If you disable this, the Mail account will not work anymore.',
        'field_type' => 'checkbox',
        'label_config' => array(
            'size_cls' => "f",
        ),
        'width' => 6,
        'fieldwidth' => 3,
    ),
    'mailbox_serverinfo' => array(
        'field_type' => 'html',
        'html' => "<strong>SERVER INFO</B>"
    ),
    'emailserver_type' => array(
        'label' => __('Email Server type*'),
        'field_type' => 'radio',
        'options' => array("IMAP", "POP"),
        'label_config' => array(
            'size_cls' => "f",
        ),
        'width' => 6,
        'fieldwidth' => 3,
    ),
    'mailaccount_hostnamesmtp' => array(
        'label' => __('SMTP Host name*'),
        'label_config' => array(
            'size_cls' => "f",
        ),
        'width' => 6,
        'fieldwidth' => 6,
    ),
    'mailaccount_hostname' => array(
        'label' => __('Host name*'),
        'label_config' => array(
            'size_cls' => "f",
        ),
        'width' => 6,
        'fieldwidth' => 6,
    ),
    'mailaccount_ssl' => array(
        'label' => __('Use SSL?'),
        'field_type' => 'checkbox',
        'help' => __('Use an SSL connection to the server'),
        'label_config' => array(
            'size_cls' => "f",
        ),
        'width' => 4,
        'fieldwidth' => 4,
    ),
    'mailbox_ignorecertif' => array(
        'label' => __('Ignore certificate?'),
        'field_type' => 'checkbox',
        'help' => __('Connect to server with self-signed SSL certificates'),
        'label_config' => array(
            'size_cls' => "f",
        ),
        'width' => 4,
        'fieldwidth' => 4,
    ),
    'mailaccount_username' => array(
        'label' => __('Username*'),
        'label_config' => array(
            'size_cls' => "f",
        ),
        'width' => 6,
        'fieldwidth' => 6,
    ),
    'mailaccount_psw' => array(
        'label' => __('Password*'),
        'label_config' => array(
            'size_cls' => "f",
        ),
        'width' => 6,
        'fieldwidth' => 6,
    )
);
